805362
@@ -213,10 +213,11 @@
private ExecBean auxRun(String program, List<String> args, Map<String, String> e
         res.exitcode = proc.waitFor();
       } catch (InterruptedException e) {
         throw new IOException(e);
+      } finally {
+        //flush
+        errorGobbler.out.flush();
+        outputGobbler.out.flush();
       }
-      //flush
-      errorGobbler.out.flush();
-      outputGobbler.out.flush();
     }
     else {
       res.exitcode = executor.execute(cmd, execEnv(env));
